package com.example.experience.java.exception;
import lombok.Data;

/**
 * @Author : 季荧
 * @ClassName : ExpException.java
 * @CreateTime : 2024/7/8 14:57
 * @Description : 异常处理
 * @Version : v1.0
 */

@Data
public class ExpException extends RuntimeException {
    private String msg;
    private int code = 500;

    public ExpException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public ExpException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public ExpException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public ExpException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}
